from tkinter import*
x=int(input('введите начальную координату x:'))
y=int(input('введите начальную координату y:'))
n=int(input('введите коэффицент увеличения n:'))
cords=[0,0,0,20,30,20,30,0,20,0,20,10,10,10,10,0]
if n==0 and x>=0 and x<=500 and y>=0 and y<=500:
    pass
else:
    if n>0 and 0*n+x>=0 and 20*n+x<=500 and 0*n+y<=500 and 20*n+y<=500:
        pass
    else:
        if n<0 and 20*n+x>=0 and 0*n+x<=500 and 20*n+y<=500 and 0*n+y<=500:
            pass
        else:
            print ('размер фигуры превышает максимальный размер поля')
            exit()
root=Tk()
root.title("ит марафон")
root.geometry('500x500')
canvas=Canvas(bg="pink",width=500,height=500)
canvas.pack (anchor=CENTER,expand=1)
canvas.create_polygon (cords[0] *n+x,cords [1] *n+y,cords [2] *n+x,cords [3] *n+y,cords [4] *n+x,cords [5] *n+y,cords [6] *n+x,cords [7] *n+y,cords [8] *n+x,cords[9] *n+x,cords [10] *n+y,cords [11] *n+x,cords [12] *n+y,cords [13] *n+x,cords [14] *n+y,cords [15])
root.mainloop()
